
package com.jiuqi.irs.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbDetailproof.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbDetailproofForm"
 */
public class TbApplicationForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String applaGuid = null;
   
   private java.lang.String orgGuid = null;

   private java.lang.String useQuantity = null;

   private java.lang.String buyCardNo = null;
   
   private java.lang.String year;
   
   private java.lang.String startnumber;
   
   private java.lang.String endnumber;
   
   private java.lang.String reccreator;
   
   private java.lang.String accordTime;
   
   private java.lang.String releaseTime;
   
   private java.lang.String applaCreatTime = null;
   
   private java.lang.String applaLastTime = null;
   
   private java.lang.String applaType = null;
  
   private java.lang.String reserved1 = null;
  
   private java.lang.String reserved2 = null;
  
   private java.lang.String reserved3 = null;
   /**
    * Standard constructor.
    */
   public TbApplicationForm() {
   }

  




public java.lang.String getYear() {
	return year;
}






public void setYear(java.lang.String year) {
	this.year = year;
}






public java.lang.String getStartnumber() {
	return startnumber;
}






public void setStartnumber(java.lang.String startnumber) {
	this.startnumber = startnumber;
}






public java.lang.String getEndnumber() {
	return endnumber;
}






public void setEndnumber(java.lang.String endnumber) {
	this.endnumber = endnumber;
}






public java.lang.String getReccreator() {
	return reccreator;
}






public void setReccreator(java.lang.String reccreator) {
	this.reccreator = reccreator;
}






public java.lang.String getAccordTime() {
	return accordTime;
}






public void setAccordTime(java.lang.String accordTime) {
	this.accordTime = accordTime;
}






public java.lang.String getReleaseTime() {
	return releaseTime;
}






public void setReleaseTime(java.lang.String releaseTime) {
	this.releaseTime = releaseTime;
}






public java.lang.String getApplaGuid() {
	return applaGuid;
}






public void setApplaGuid(java.lang.String applaGuid) {
	this.applaGuid = applaGuid;
}






public java.lang.String getOrgGuid() {
	return orgGuid;
}






public void setOrgGuid(java.lang.String orgGuid) {
	this.orgGuid = orgGuid;
}






public java.lang.String getUseQuantity() {
	return useQuantity;
}






public void setUseQuantity(java.lang.String useQuantity) {
	this.useQuantity = useQuantity;
}






public java.lang.String getBuyCardNo() {
	return buyCardNo;
}






public void setBuyCardNo(java.lang.String buyCardNo) {
	this.buyCardNo = buyCardNo;
}






public java.lang.String getApplaCreatTime() {
	return applaCreatTime;
}






public void setApplaCreatTime(java.lang.String applaCreatTime) {
	this.applaCreatTime = applaCreatTime;
}






public java.lang.String getApplaLastTime() {
	return applaLastTime;
}






public void setApplaLastTime(java.lang.String applaLastTime) {
	this.applaLastTime = applaLastTime;
}






public java.lang.String getApplaType() {
	return applaType;
}






public void setApplaType(java.lang.String applaType) {
	this.applaType = applaType;
}






public java.lang.String getReserved1() {
	return reserved1;
}






public void setReserved1(java.lang.String reserved1) {
	this.reserved1 = reserved1;
}






public java.lang.String getReserved2() {
	return reserved2;
}






public void setReserved2(java.lang.String reserved2) {
	this.reserved2 = reserved2;
}






public java.lang.String getReserved3() {
	return reserved3;
}






public void setReserved3(java.lang.String reserved3) {
	this.reserved3 = reserved3;
}






public static SimpleDateFormat getFormat() {
	return FORMAT;
}






/**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getOrgGuid() == null) {
         errors.add("orgGuid", new ActionError("error.orgGuid.required"));
      }
      if(getApplaGuid() == null) {
         errors.add("applaGuid", new ActionError("error.applaGuid.required"));
      }
     
      // TODO test format/data
      return errors;
   }
}
